import { BasicColumn } from '/@/components/Table';
import { FormSchema } from '/@/components/Table';
import { rules } from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
import { getWeekMonthQuarterYear } from '/@/utils';
//列表数据
export const columns: BasicColumn[] = [
  {
    title: '创建时间',
    align: "center",
    dataIndex: 'createTime'
  },
  {
    title: '姓名',
    align: "center",
    dataIndex: 'name'
  },
  {
    title: '联系电话',
    align: "center",
    dataIndex: 'phone'
  },
  {
    title: '性别',
    align: "center",
    dataIndex: 'gender'
  },
  {
    title: '年龄',
    align: "center",
    dataIndex: 'age'
  },
  {
    title: '文化程度',
    align: "center",
    dataIndex: 'education'
  },
  {
    title: '从事职业',
    align: "center",
    dataIndex: 'job'
  },
  {
    title: '问题1',
    align: "center",
    dataIndex: 'question1'
  },
  {
    title: '问题2',
    align: "center",
    dataIndex: 'question2'
  },
  {
    title: '问题3',
    align: "center",
    dataIndex: 'question3'
  },
  {
    title: '问题4',
    align: "center",
    dataIndex: 'question4'
  },
  {
    title: '问题5',
    align: "center",
    dataIndex: 'question5'
  },
  {
    title: '问题6',
    align: "center",
    dataIndex: 'question6'
  },
  {
    title: '问题7',
    align: "center",
    dataIndex: 'question7'
  },
  {
    title: '问题8',
    align: "center",
    dataIndex: 'question8'
  },
  {
    title: '问题9',
    align: "center",
    dataIndex: 'question9'
  },
  {
    title: '问题10',
    align: "center",
    dataIndex: 'question10'
  },
  {
    title: '问题11',
    align: "center",
    dataIndex: 'question11'
  },
  {
    title: '问题12',
    align: "center",
    dataIndex: 'question12'
  },
  {
    title: '问题13',
    align: "center",
    dataIndex: 'question13'
  },
  {
    title: '问题14',
    align: "center",
    dataIndex: 'question14'
  },
  {
    title: '问题15',
    align: "center",
    dataIndex: 'question15'
  },
  {
    title: '问题16',
    align: "center",
    dataIndex: 'question16'
  },
  {
    title: '问题17',
    align: "center",
    dataIndex: 'question17'
  },
  {
    title: '问题18',
    align: "center",
    dataIndex: 'question18'
  },
  {
    title: '得分',
    align: "center",
    dataIndex: 'totalScore'
  },
  {
    title: '描述',
    align: "center",
    dataIndex: 'scoreMsg'
  },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
  {
    label: "创建时间",
    field: 'createTime',
    component: 'RangePicker',
    componentProps: {
      valueType: 'Date',
    },
    //colProps: {span: 6},
  },
  {
    label: "姓名",
    field: 'name',
    component: 'Input',
    //colProps: {span: 6},
  },
  {
    label: "联系电话",
    field: 'phone',
    component: 'Input',
    //colProps: {span: 6},
  },

];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '姓名',
    field: 'name',
    component: 'Input',
  },
  {
    label: '联系电话',
    field: 'phone',
    component: 'Input',
  },
  {
    label: '性别',
    field: 'gender',
    component: 'Input',
  },
  {
    label: '年龄',
    field: 'age',
    component: 'Input',
  },
  {
    label: '文化程度',
    field: 'education',
    component: 'Input',
  },
  {
    label: '从事职业',
    field: 'job',
    component: 'Input',
  },
  {
    label: '问题1',
    field: 'question1',
    component: 'Input',
  },
  {
    label: '问题2',
    field: 'question2',
    component: 'Input',
  },
  {
    label: '问题3',
    field: 'question3',
    component: 'Input',
  },
  {
    label: '问题4',
    field: 'question4',
    component: 'Input',
  },
  {
    label: '问题5',
    field: 'question5',
    component: 'Input',
  },
  {
    label: '问题6',
    field: 'question6',
    component: 'Input',
  },
  {
    label: '问题7',
    field: 'question7',
    component: 'Input',
  },
  {
    label: '问题8',
    field: 'question8',
    component: 'Input',
  },
  {
    label: '问题9',
    field: 'question9',
    component: 'Input',
  },
  {
    label: '问题10',
    field: 'question10',
    component: 'Input',
  },
  {
    label: '问题11',
    field: 'question11',
    component: 'Input',
  },
  {
    label: '问题12',
    field: 'question12',
    component: 'Input',
  },
  {
    label: '问题13',
    field: 'question13',
    component: 'Input',
  },
  {
    label: '问题14',
    field: 'question14',
    component: 'Input',
  },
  {
    label: '问题15',
    field: 'question15',
    component: 'Input',
  },
  {
    label: '问题16',
    field: 'question16',
    component: 'Input',
  },
  {
    label: '问题17',
    field: 'question17',
    component: 'Input',
  },
  {
    label: '问题18',
    field: 'question18',
    component: 'Input',
  },
  {
    label: '得分',
    field: 'totalScore',
    component: 'Input',
  },
  {
    label: '描述',
    field: 'scoreMsg',
    component: 'Input',
  },
  // TODO 主键隐藏字段，目前写死为ID
  {
    label: '',
    field: 'id',
    component: 'Input',
    show: false
  },
];

// 高级查询数据
export const superQuerySchema = {
  name: { title: '姓名', order: 0, view: 'text', type: 'string', },
  phone: { title: '联系电话', order: 1, view: 'text', type: 'string', },
  gender: { title: '性别', order: 2, view: 'text', type: 'string', },
  age: { title: '年龄', order: 3, view: 'text', type: 'string', },
  education: { title: '文化程度', order: 4, view: 'text', type: 'string', },
  job: { title: '从事职业', order: 5, view: 'text', type: 'string', },
  question1: { title: '问题1', order: 6, view: 'text', type: 'string', },
  question2: { title: '问题2', order: 7, view: 'text', type: 'string', },
  question3: { title: '问题3', order: 8, view: 'text', type: 'string', },
  question4: { title: '问题4', order: 9, view: 'text', type: 'string', },
  question5: { title: '问题5', order: 10, view: 'text', type: 'string', },
  question6: { title: '问题6', order: 11, view: 'text', type: 'string', },
  question7: { title: '问题7', order: 12, view: 'text', type: 'string', },
  question8: { title: '问题8', order: 13, view: 'text', type: 'string', },
  question9: { title: '问题9', order: 14, view: 'text', type: 'string', },
  question10: { title: '问题10', order: 15, view: 'text', type: 'string', },
  question11: { title: '问题11', order: 16, view: 'text', type: 'string', },
  question12: { title: '问题12', order: 17, view: 'text', type: 'string', },
  question13: { title: '问题13', order: 18, view: 'text', type: 'string', },
  question14: { title: '问题14', order: 19, view: 'text', type: 'string', },
  question15: { title: '问题15', order: 20, view: 'text', type: 'string', },
  question16: { title: '问题16', order: 21, view: 'text', type: 'string', },
  question17: { title: '问题17', order: 22, view: 'text', type: 'string', },
  question18: { title: '问题18', order: 23, view: 'text', type: 'string', },
  totalScore: { title: '得分', order: 24, view: 'text', type: 'string', },
  scoreMsg: { title: '描述', order: 25, view: 'text', type: 'string', },
};

/**
* 流程表单调用这个方法获取formSchema
* @param param
*/
export function getBpmFormSchema(_formData): FormSchema[] {
  // 默认和原始表单保持一致 如果流程中配置了权限数据，这里需要单独处理formSchema
  return formSchema;
}